<!-- daterange picker -->
<link rel="stylesheet" href="__PUBLIC__/AdminLTE/plugins/daterangepicker/daterangepicker.css">
<div class="content-wrapper">
    <section class="content-header">
        <h1>订单报价</h1>
        <ol class="breadcrumb">
            <li><a href="/"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">订单管理</li>
            <li class="active">订单报价</li>
        </ol>
    </section>
    <section class="content">
        <div class="box">
            <div class="box-header with-border">
                <form class="form-inline" action="/order/quotedOrderList" method="get">
                    <div class="form-group">
                        <label for="company_name">客户名称 </label>
                        <input type="text" class="form-control" id="company_name" name="company_name" placeholder="客户名称" value="{$company_name}">
                    </div>
                    <div class="form-group">
                        <label for="department_id" class="control-label">部门 </label>
                        <select id="department_id" class="form-control" name="department_id">
                            <option value="0">请选择</option>
                            <foreach name="departmentList" item="department">
                                <option value="{$department.id}" <if condition="$department.id eq $department_id ">selected</if>>{$department.name}</option>
                            </foreach>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="admin_name">部门人员 </label>
                        <input type="text" class="form-control" id="admin_name" name="admin_name" placeholder="部门人员" value="{$admin_name}">
                    </div>
                    <div class="form-group">
                        <label class="label-control" for="status">状态 </label>
                        <select id="status" name="status" class="form-control">
                            <option value="0">请选择</option>
                            <foreach name="orderStatusList" item="status_val" key="key_val">
                                <option value="{$key_val}" <if condition="$key_val eq $status ">selected</if>>{$status_val}</option>
                            </foreach>
                        </select>
                    </div>
                    <button type="submit" class="btn btn-info" id="save-btn">查询</button>
                </form>
            </div>
            <div class="box-body table-responsive">
                <table class="table table-bordered">
                    <tbody>
                    <tr>
                        <th style="width: 80px">ID</th>
                        <th>订单ID</th>
                        <th>客户类型</th>
                        <th>客户名称</th>
                        <th>分类</th>
                        <th>推广产品</th>
                        <th>部门</th>
                        <th>部门人员</th>
                        <th>状态</th>
                        <th>接收时间</th>
                        <th>操作</th>
                    </tr>
                    <if condition="count($orderList) eq 0"><tr><td class="text-center" colspan="12">暂无数据...</td></tr></if>
                    <foreach name="orderList" item="order">
                        <tr>
                            <td>{$order.order_id}</td>
                            <td>{$order.order_code}</td>
                            <td>{$order.customer_type}</td>
                            <td>{$order.company_name}</td>
                            <td>{$order.category_name}</td>
                            <td>{$order.product_name}</td>
                            <td>{$order.department_name}</td>
                            <td>{$order.admin_name}</td>
                            <td><p class="text text-danger">{$order.status_desc}
                                <if condition="$order.status eq 35 ">
                                    <if condition="$order.dp_manager_review eq 1 ">
                                        <span class="label label-success">已通过</span>
                                        <else />
                                        <span class="label label-danger">已拒绝</span>
                                    </if>
                                    <elseif condition="$order.status eq 40 " />
                                    <if condition="$order.director_review eq 1 ">
                                        <span class="label label-success">已通过</span>
                                        <else />
                                        <span class="label label-danger">已拒绝</span>
                                    </if>
                                    <elseif condition="$order.status eq 45 " />
                                    <if condition="$order.g_manager_review eq 1 ">
                                        <span class="label label-success">已通过</span>
                                        <else />
                                        <span class="label label-danger">已拒绝</span>
                                    </if>
                                </if>
                                </p>
                            </td>
                            <td>{$order.deal_time}</td>
                            <td style="width: 130px">
								<php>if($order['status']<55 && ($order['status']!=-1)){</php>
                                <button class="btn btn-success btn-xs" type="button" onclick="window.location.href='/admin/order/quotedOrderItemList?order_id={$order.order_id}'"><i class="fa fa-send-o"></i>&nbsp;报价</button>&nbsp;
                                <button class="btn btn-primary btn-xs" type="button" onclick="window.location.href='/admin/order/quotedOrderItemList?order_id={$order.order_id}'"><i class="fa fa-calendar-minus-o"></i>&nbsp;排期</button>&nbsp;
								<php>}</php>
								<button class="btn bg-maroon btn-xs " type="button" onclick="window.location.href='/admin/order/orderDetail?id={$order.order_id}'">详情</button>&nbsp;
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
            <div class="box-footer clearfix">{$page_html}</div>
        </div>
    </section>
</div>